package hn.cch.nacos.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping(value = "/nacos")
@RestController
public class NacosController {

    @Value(value = "${nacos.config.value:nacos-value}")
    private String configValue;

    @Value("${useLocalCache:false}")
    private boolean useLocalCache;

    @RequestMapping("/useLocalCache")
    public boolean useLocalCache() {
        return useLocalCache;
    }

    @GetMapping(value = "/getConfigValue")
    public String getConfigValue() {
        return configValue;
    }

}
